package com.atguigu.gmall.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * title:
 * author: Gyh
 * date:2023-05-04 18:27
 * Description:
 */
@Controller
public class LoginController {

    /**
     * 渲染登录页面
     * @param originUrl 登录前访问页面地址
     * @param model
     * @return
     */
    @GetMapping("/login.html")
    public String loginHtml(@RequestParam("originUrl") String originUrl, Model model){
        model.addAttribute("originUrl",originUrl);
        return "/login";
    }
}
